<?php
namespace Home\Controller;
use Think\Controller;
class SureorderController extends PublicController {
	
    public function sureorder(){
		$this->assign("k",CONTROLLER_NAME);
		$this->assign("f",ACTION_NAME);
		$this->listshow();
		$this->display();
	}
	public function listshow(){
		
		$name = session('name');
		$shu = M('user')->field('id')->where("name = '$name'")->find();
		$id = $shu['id'];
		$res = M('shoping')->where("user_id = '$id' and status = '1'")->select();
		foreach($res as $k=>$v){
			$allid[] = $v['p_id'];
		}
		$allpid = implode(',',$allid);
		$this->assign("allpid",$allpid);
		$this->assign("res",$res);
		//var_dump($res);
		
	}
}